﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace Himp.Platform
{
    /// <summary>
    /// 待办
    /// </summary>
    public class WorkflowTodoService : PlatformAppService
    {
        private ActiviWorkflowManager _workflowManager;

        public WorkflowTodoService(ActiviWorkflowManager workflowManager)
        {
            _workflowManager = workflowManager;
        }

        //public async Task<PagedResultDto<WorkflowInstanceDto>> GetListAsync(WorkflowInstanceInput input)
        //{
        //    var list = await _workflowManager.GetProcessInstance(input.Status);
        //    var itemsDto = ObjectMapper.Map<List<WorkflowInstance>, List<WorkflowInstanceDto>>(list);

        //    if (input.Pi == 0)
        //    {
        //        return new PagedResultDto<WorkflowInstanceDto>(itemsDto.Count, itemsDto);
        //    }
        //    else
        //    {
        //        var totalCount = itemsDto.Count();
        //        var pagedItems = itemsDto.Skip((input.Pi - 1) * input.Ps).Take(input.Ps);

        //        return new PagedResultDto<WorkflowInstanceDto>(totalCount, pagedItems.ToList());
        //    }
        //}
    }
}
